PIM-SM (Protocol Independent Multicast-Sparse Mode) is a protocol that can route an IP packet to an extensive network multicast group effectively. The protocol performs topology discovery without depending on any specific unicast routing protocol, and is primarily applied in a multicast network of a sparse group. Generally, in a PIM-SM network, a network device is selected as an RP of the PIM-SM network. When a member device in the PIM-SM network needs to obtain a multicast data stream, the member device sends a join message to the RP to join a shared tree (that is, a multicast distribution tree established by member devices). A multicast source sends the multicast data stream to the RP through unicast, then the RP sends the multicast data stream to each member device along the shared tree.
To ensure normal working of the PIM-SM network, reliability of the RP needs to be improved. Generally, multiple network devices are configured as RPs in the PIM-SM network, including one working RP and multiple candidate RPs. For example, a network device 1 is a working RP, and a network device 2, a network device 3, and a network device 4 are candidate RPs. When an interface at which an RP on the network device 1 is located is faulty, the network device 1 may send a Candidate-RP-Advertisement to a BSR (BootStrap Router) through another interface, where HoldTime in the Candidate-RP-Advertisement is 0, so as to indicate that the network device 1 times out. After receiving the Candidate-RP-Advertisement, the BSR instructs other network devices in the PIM-SM network to delete a saved original working RP (that is, the network device 1) and enable a new working RP (the network device 2, the network device 3, or the network device 4), so as to ensure normal working of the PIM-SM network. The process of deleting the original working RP that is faulty and enabling a candidate RP as a new working RP is RP convergence.
In the process of implementing the present invention, the inventor finds that the prior art has at least the following problems:
When a network device served as an RP is entirely faulty (for example, the network device restarts, or all interfaces of the network device are faulty), the network device cannot send a candidate RP advertisement message to the BSR, and other network devices do not enable a candidate RP as a new working RP until a saved original working RP has aged. The aging of the RP is time-consuming, so that an available RP does not exist in the network for a long time, thereby causing that the entire network cannot work normally for a long time.